/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 * 
 */

package com.googlecode.javalearningproject.VEK_ME;

import com.googlecode.javalearningproject.VEK_ME.GUI.MainGraphicsCanvas;
import java.io.IOException;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 * @author Administrator
 * Inspiration fra: http://www.java2s.com/Code/Java/J2ME/Drawimmutableimageonacanvas.htm
 * og http://developers.sun.com/mobility/midp/articles/game/
 * 
 */
public class Main extends MIDlet {
    
    private Display display;
    private MainGraphicsCanvas canvas;
    
    public Main() throws IOException
    {
        display = Display.getDisplay(this);
        canvas = new MainGraphicsCanvas();
    }
    
    public void startApp() {
        display.setCurrent( canvas );
        canvas.paintCanvas();
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
    
    public void exitMIDlet()
    {
        destroyApp(true);
        notifyDestroyed();
    }
}
